//设置变量
@bg-color:#b7d4ab;
* {
  margin: 0;
  padding: 0;
  //改变盒子模型计算方式
  box-sizing: border-box;
}
#main {
  width: 360px;
  height: 420px;
  background-color: @bg-color;
  margin: 100px auto;
  border: 10px solid black;
  border-radius:40px ;
  //开启弹性盒
  display:flex;
  //设置主轴的方向
  flex-flow: column;

  //设置侧轴的对齐方式
  align-items: center;
  //设置主轴的对齐方式
  justify-content: space-around;
  #stage {
    width: 304px;
    height: 304px;
    border: 2px black solid;
    position: relative;

  }
  #sc {
    width: 300px;
    display: flex;
    justify-content: space-between;
  }
  #snake>div {

      width: 10px;
      height: 10px;
      background-color: #000;
      border: 1px solid @bg-color ;
      //开启绝对定位
      position: absolute;

  }
  #food {
    width: 10px;
    height: 10px;
    //开启弹性盒
    display: flex;
    //设置横轴为主轴，warp表示会自动换行
    flex-flow: row wrap;
    //设置主轴和侧周的空白空间分配到元素之间
    justify-content: space-between;
    align-content: space-between;
    //开启绝对定位
    position: absolute;
    left: 40px;
    top: 100px;
    &>div {
      width: 4px;
      height: 4px;
      background-color: black;
      //旋转45角
      transform: rotate(45deg);
    }
  }
}

body {
  font: bold 20px "Courier New";
}